/*    */ package server.maps;
/*    */ 
/*    */ import java.awt.Point;
/*    */ 
/*    */ public class MapleFoothold implements Comparable<MapleFoothold> {
/*    */   private final Point p1;
/*    */   private final Point p2;
/*    */   private final int id;
/*    */   private short next;
/*    */   private short prev;
/*    */   
/*    */   public MapleFoothold(Point p1, Point p2, int id) {
/* 13 */     this.p1 = p1;
/* 14 */     this.p2 = p2;
/* 15 */     this.id = id;
/*    */   }
/*    */   
/*    */   public boolean isWall() {
/* 19 */     return (this.p1.x == this.p2.x);
/*    */   }
/*    */   
/*    */   public Point getPoint1() {
/* 23 */     return this.p1;
/*    */   }
/*    */   
/*    */   public Point getPoint2() {
/* 27 */     return this.p2;
/*    */   }
/*    */   
/*    */   public int getX1() {
/* 31 */     return this.p1.x;
/*    */   }
/*    */   
/*    */   public int getX2() {
/* 35 */     return this.p2.x;
/*    */   }
/*    */   
/*    */   public int getY1() {
/* 39 */     return this.p1.y;
/*    */   }
/*    */   
/*    */   public int getY2() {
/* 43 */     return this.p2.y;
/*    */   }
/*    */ 
/*    */   
/*    */   public int compareTo(MapleFoothold o) {
/* 48 */     if (this.p2.y < o.getY1())
/* 49 */       return -1; 
/* 50 */     if (this.p1.y > o.getY2()) {
/* 51 */       return 1;
/*    */     }
/* 53 */     return 0;
/*    */   }
/*    */ 
/*    */ 
/*    */   
/*    */   public boolean equals(Object o) {
/* 59 */     if (!(o instanceof MapleFoothold)) {
/* 60 */       return false;
/*    */     }
/* 62 */     MapleFoothold oth = (MapleFoothold)o;
/* 63 */     return (oth.getY1() == this.p1.y && oth.getY2() == this.p2.y && oth.getX1() == this.p1.x && oth.getX2() == this.p2.x && this.id == oth.getId());
/*    */   }
/*    */   
/*    */   public int getId() {
/* 67 */     return this.id;
/*    */   }
/*    */   
/*    */   public short getNext() {
/* 71 */     return this.next;
/*    */   }
/*    */   
/*    */   public void setNext(short next) {
/* 75 */     this.next = next;
/*    */   }
/*    */   
/*    */   public short getPrev() {
/* 79 */     return this.prev;
/*    */   }
/*    */   
/*    */   public void setPrev(short prev) {
/* 83 */     this.prev = prev;
/*    */   }
/*    */ }


/* Location:              C:\PGX\Server.jar!\server\maps\MapleFoothold.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */